<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE" />
        <title>非对称加密算法 | iOS 网络编程</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.0.1">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
        
    
    
    <link rel="next" href="./post_method.html" />
    
    
    <link rel="prev" href="./cipher-04-aes.html" />
    

        
    </head>
    <body>
        
        
    <link rel="stylesheet" href="gitbook/style.css">
    
    

        
    <div class="book" data-level="0.6.5" data-basepath="." data-revision="Fri Jun 12 2015 06:59:00 GMT+0800 (CST)">
    

<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Type to search" class="form-control" />
    </div>
    <ul class="summary">
        
        
        
        

        

        
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="./index.html">
                        <i class="fa fa-check"></i>
                        
                        网络
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.1" data-path="basic.html">
            
                
                    <a href="./basic.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.</b>
                        
                        基本概念
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.1.1" data-path="basic-00-apache.html">
            
                
                    <a href="./basic-00-apache.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.1.</b>
                        
                        配置 Apache 服务器
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.2" data-path="basic-01-http.html">
            
                
                    <a href="./basic-01-http.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.2.</b>
                        
                        HTTP
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.3" data-path="basic-02-dev.html">
            
                
                    <a href="./basic-02-dev.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.3.</b>
                        
                        开发方案
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.1.4" data-path="basic-03-nsurlconnection.html">
            
                
                    <a href="./basic-03-nsurlconnection.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.1.4.</b>
                        
                        NSURLConnection
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.2" data-path="socket.html">
            
                
                    <a href="./socket.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.</b>
                        
                        socket
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.2.1" data-path="socket-01-basic_code.html">
            
                
                    <a href="./socket-01-basic_code.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.1.</b>
                        
                        Socket 基本演练
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.2.2" data-path="socket-02-chat.html">
            
                
                    <a href="./socket-02-chat.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.2.</b>
                        
                        Socket 聊天
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.2.3" data-path="socket-03-baidu.html">
            
                
                    <a href="./socket-03-baidu.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.2.3.</b>
                        
                        Socket 加载百度
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.3" data-path="serialization.html">
            
                
                    <a href="./serialization.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.</b>
                        
                        数据解析
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.1" data-path="serialization-01-json.html">
            
                
                    <a href="./serialization-01-json.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.1.</b>
                        
                        JSON 解析
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.1.1" data-path="json-01-framework.html">
            
                
                    <a href="./json-01-framework.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.1.1.</b>
                        
                        JSON 解析第三方框架
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.3.2" data-path="serialization-03-plist.html">
            
                
                    <a href="./serialization-03-plist.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.2.</b>
                        
                        PList解析
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3" data-path="serialization-04-xml.html">
            
                
                    <a href="./serialization-04-xml.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.</b>
                        
                        XML介绍
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.3.3.1" data-path="xml-01-preparation.html">
            
                
                    <a href="./xml-01-preparation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.1.</b>
                        
                        准备工作
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.2" data-path="xml-02-parser.html">
            
                
                    <a href="./xml-02-parser.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.2.</b>
                        
                        解析
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.3" data-path="xml-03-tableview.html">
            
                
                    <a href="./xml-03-tableview.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.3.</b>
                        
                        绑定表格
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.4" data-path="xml-04-copy_properties.html">
            
                
                    <a href="./xml-04-copy_properties.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.4.</b>
                        
                        Copy 属性
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.5" data-path="xml-05-refactor.html">
            
                
                    <a href="./xml-05-refactor.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.5.</b>
                        
                        重构
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.3.3.6" data-path="xml-06-dom.html">
            
                
                    <a href="./xml-06-dom.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.3.3.6.</b>
                        
                        DOM 解析
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.4" data-path="get_&amp;_post.html">
            
                
                    <a href="./get_&amp;_post.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.4.</b>
                        
                        GET &amp; POST
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.4.1" data-path="get_&amp;_post-01-cachedurlresponse.html">
            
                
                    <a href="./get_&amp;_post-01-cachedurlresponse.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.4.1.</b>
                        
                        GET 缓存
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.5" data-path="user_login.html">
            
                
                    <a href="./user_login.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.</b>
                        
                        用户登录
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.5.1" data-path="user_login-01-get&amp;post_login.html">
            
                
                    <a href="./user_login-01-get&amp;post_login.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.1.</b>
                        
                        GET &amp; POST 登录
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.5.2" data-path="user_login-02-save_&amp;_load_user_info.html">
            
                
                    <a href="./user_login-02-save_&amp;_load_user_info.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.2.</b>
                        
                        保存 &amp; 加载用户信息
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.5.3" data-path="user_login-03-refactor.html">
            
                
                    <a href="./user_login-03-refactor.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.5.3.</b>
                        
                        代码重构
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.6" data-path="cipher.html">
            
                
                    <a href="./cipher.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.</b>
                        
                        密码学
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.6.1" data-path="cipher-01-base64.html">
            
                
                    <a href="./cipher-01-base64.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.1.</b>
                        
                        Base64
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.2" data-path="cipher-02-md5.html">
            
                
                    <a href="./cipher-02-md5.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.2.</b>
                        
                        MD5
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.3" data-path="cipher-03-key_chain.html">
            
                
                    <a href="./cipher-03-key_chain.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.3.</b>
                        
                        钥匙串
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.6.4" data-path="cipher-04-aes.html">
            
                
                    <a href="./cipher-04-aes.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.4.</b>
                        
                        对称加密算法
                    </a>
                
            
            
        </li>
    
        <li class="chapter active" data-level="0.6.5" data-path="cipher-05-rsa.html">
            
                
                    <a href="./cipher-05-rsa.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.6.5.</b>
                        
                        非对称加密算法
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.7" data-path="post_method.html">
            
                
                    <a href="./post_method.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.</b>
                        
                        POST增强
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.7.1" data-path="post_method-01-upload_file.html">
            
                
                    <a href="./post_method-01-upload_file.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.1.</b>
                        
                        上传单个文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.2" data-path="post_method-02-upload_multi_files.html">
            
                
                    <a href="./post_method-02-upload_multi_files.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.2.</b>
                        
                        上传多个文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.3" data-path="post_method_03_restful.html">
            
                
                    <a href="./post_method_03_restful.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.3.</b>
                        
                        RESTful设计风格
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.4" data-path="post_method-04-post_json.html">
            
                
                    <a href="./post_method-04-post_json.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.4.</b>
                        
                        POST JSON
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.7.5" data-path="post_method-05-post_custom_object.html">
            
                
                    <a href="./post_method-05-post_custom_object.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.7.5.</b>
                        
                        POST 自定义对象
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.8" data-path="download.html">
            
                
                    <a href="./download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.</b>
                        
                        NSURLConnection下载
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.8.1" data-path="download-01-head_method.html">
            
                
                    <a href="./download-01-head_method.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.1.</b>
                        
                        HTTP HEAD方法
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.2" data-path="download-02-nsurlconnectiondownloaddelegate.html">
            
                
                    <a href="./download-02-nsurlconnectiondownloaddelegate.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.2.</b>
                        
                        NSURLConnectionDownloadDelegate
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.3" data-path="download-03-download_progress.html">
            
                
                    <a href="./download-03-download_progress.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.3.</b>
                        
                        下载进度
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.4" data-path="download-04-nsfilehandle.html">
            
                
                    <a href="./download-04-nsfilehandle.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.4.</b>
                        
                        NSFileHandle拼接文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.5" data-path="download-05-nsoutputstream.html">
            
                
                    <a href="./download-05-nsoutputstream.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.5.</b>
                        
                        NSOutputStream拼接文件
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.6" data-path="download-06-resume_download.html">
            
                
                    <a href="./download-06-resume_download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.6.</b>
                        
                        断点续传
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.7" data-path="download-07-multithread.html">
            
                
                    <a href="./download-07-multithread.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.7.</b>
                        
                        多线程
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.8" data-path="download-08-call_back.html">
            
                
                    <a href="./download-08-call_back.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.8.</b>
                        
                        完成回调
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.9" data-path="download-09-pause_download.html">
            
                
                    <a href="./download-09-pause_download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.9.</b>
                        
                        暂停下载
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.10" data-path="download-10-progress_view.html">
            
                
                    <a href="./download-10-progress_view.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.10.</b>
                        
                        下载进度视图
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.11" data-path="download-11-download_manager.html">
            
                
                    <a href="./download-11-download_manager.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.11.</b>
                        
                        下载管理器
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.8.12" data-path="download-12-nsoperation.html">
            
                
                    <a href="./download-12-nsoperation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.8.12.</b>
                        
                        NSOperation
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.9" data-path="nsurlsession.html">
            
                
                    <a href="./nsurlsession.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.</b>
                        
                        NSURLSession
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.9.1" data-path="nsurlsession-01-common_code.html">
            
                
                    <a href="./nsurlsession-01-common_code.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.1.</b>
                        
                        常见代码
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2" data-path="nsurlsession-02-download.html">
            
                
                    <a href="./nsurlsession-02-download.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.</b>
                        
                        下载 &amp; 解压缩
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.9.2.1" data-path="nsurlsession-02-download-01-progress.html">
            
                
                    <a href="./nsurlsession-02-download-01-progress.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.1.</b>
                        
                        下载进度跟进
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2.2" data-path="nsurlsession-02-download-02-resume_data.html">
            
                
                    <a href="./nsurlsession-02-download-02-resume_data.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.2.</b>
                        
                        断点续传
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.2.3" data-path="nsurlsession-02-download-03-download_manager.html">
            
                
                    <a href="./nsurlsession-02-download-03-download_manager.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.2.3.</b>
                        
                        下载管理器
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.9.3" data-path="nsurlsession-03-webdav.html">
            
                
                    <a href="./nsurlsession-03-webdav.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.3.</b>
                        
                        WebDav演练
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.4" data-path="nsurlsession-04-configuration.html">
            
                
                    <a href="./nsurlsession-04-configuration.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.4.</b>
                        
                        Configuration
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.9.5" data-path="nsurlsession-05-post_upload.html">
            
                
                    <a href="./nsurlsession-05-post_upload.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.9.5.</b>
                        
                        POST 上传
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="0.10" data-path="https.html">
            
                
                    <a href="./https.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.10.</b>
                        
                        HTTPS
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.11" data-path="biometrics.html">
            
                
                    <a href="./biometrics.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.11.</b>
                        
                        指纹识别
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12" data-path="appendix.html">
            
                
                    <a href="./appendix.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.</b>
                        
                        附录
                    </a>
                
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="0.12.1" data-path="appendix-01-archiver_&amp;_unarchiver.html">
            
                
                    <a href="./appendix-01-archiver_&amp;_unarchiver.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.1.</b>
                        
                        归档 &amp; 解档
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.2" data-path="appendix-02-caanimation.html">
            
                
                    <a href="./appendix-02-caanimation.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.2.</b>
                        
                        核心动画
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.3" data-path="appendix-03-kvo.html">
            
                
                    <a href="./appendix-03-kvo.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.3.</b>
                        
                        KVO
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.4" data-path="appendix-04-nil&amp;null.html">
            
                
                    <a href="./appendix-04-nil&amp;null.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.4.</b>
                        
                        nil&amp;null&amp;Nil&amp;NSNull
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.5" data-path="appendix-http_request_field.html">
            
                
                    <a href="./appendix-http_request_field.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.5.</b>
                        
                        常用 HTTP 请求字段
                    </a>
                
            
            
        </li>
    
        <li class="chapter " data-level="0.12.6" data-path="appendix-cocoapods.html">
            
                
                    <a href="./appendix-cocoapods.html">
                        <i class="fa fa-check"></i>
                        
                            <b>0.12.6.</b>
                        
                        Cocoapods
                    </a>
                
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    


        
        <li class="divider"></li>
        <li>
            <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                Published with GitBook
            </a>
        </li>
        
    </ul>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header">
    <!-- Actions Left -->
    <a href="#" class="btn pull-left toggle-summary" aria-label="Table of Contents"><i class="fa fa-align-justify"></i></a>
    <a href="#" class="btn pull-left toggle-search" aria-label="Search"><i class="fa fa-search"></i></a>
    
    <div id="font-settings-wrapper" class="dropdown pull-left">
        <a href="#" class="btn toggle-dropdown" aria-label="Font Settings"><i class="fa fa-font"></i>
        </a>
        <div class="dropdown-menu font-settings">
    <div class="dropdown-caret">
        <span class="caret-outer"></span>
        <span class="caret-inner"></span>
    </div>

    <div class="buttons">
        <button type="button" id="reduce-font-size" class="button size-2">A</button>
        <button type="button" id="enlarge-font-size" class="button size-2">A</button>
    </div>

    <div class="buttons font-family-list">
        <button type="button" data-font="0" class="button">Serif</button>
        <button type="button" data-font="1" class="button">Sans</button>
    </div>

    <div class="buttons color-theme-list">
        <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
        <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
        <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
    </div>
</div>

    </div>

    <!-- Actions Right -->
    
    <div class="dropdown pull-right">
        <a href="#" class="btn toggle-dropdown" aria-label="Share"><i class="fa fa-share-alt"></i>
        </a>
        <div class="dropdown-menu font-settings dropdown-left">
            <div class="dropdown-caret">
                <span class="caret-outer"></span>
                <span class="caret-inner"></span>
            </div>
            <div class="buttons">
                <button type="button" data-sharing="twitter" class="button">
                    Share on Twitter
                </button>
                <button type="button" data-sharing="google-plus" class="button">
                    Share on Google
                </button>
                <button type="button" data-sharing="facebook" class="button">
                    Share on Facebook
                </button>
                <button type="button" data-sharing="weibo" class="button">
                    Share on Weibo
                </button>
                <button type="button" data-sharing="instapaper" class="button">
                    Share on Instapaper
                </button>
            </div>
        </div>
    </div>
    

    
    <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Google"><i class="fa fa-google-plus"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
    
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="./" >iOS 网络编程</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="%E9%9D%9E%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86%E7%AE%97%E6%B3%95">&#x975E;&#x5BF9;&#x79F0;&#x52A0;&#x5BC6;&#x7B97;&#x6CD5;</h1>
<blockquote>
<p>&#x63D0;&#x793A;&#xFF1A;&#x52A0;&#x5BC6;&#x5185;&#x5BB9;&#x5C5E;&#x4E8E;&#x9AD8;&#x7EA7;&#x7A0B;&#x5E8F;&#x5458;&#x7684;&#x8BDD;&#x9898;&#xFF01;&#x6709;&#x4E9B;&#x5185;&#x5BB9;&#x4F1A;&#x5F88;&#x67AF;&#x71E5;&#xFF01;&#x6CE8;&#x610F;&#x638C;&#x63E1;&#x52A0;&#x5BC6;&#x7684;&#x601D;&#x8DEF;&#x548C;&#x64CD;&#x4F5C;&#x6B65;&#x9AA4;&#x5373;&#x53EF;&#xFF01;&#x4EE3;&#x7801;&#x4E0D;&#x8981;&#x6C42;&#x4F1A;&#x5199;&#xFF0C;&#x53EA;&#x8981;&#x4F1A;&#x7528;&#x5C31;&#x884C;&#xFF01;</p>
</blockquote>
<h2 id="%E4%BB%8B%E7%BB%8D">&#x4ECB;&#x7ECD;</h2>
<ul>
<li>&#x975E;&#x5BF9;&#x79F0;&#x52A0;&#x5BC6;&#x7B97;&#x6CD5;&#x9700;&#x8981;&#x4E24;&#x4E2A;&#x5BC6;&#x94A5;&#xFF1A;<code>&#x516C;&#x5F00;&#x5BC6;&#x94A5;&#xFF08;publickey&#xFF09;</code> &#x548C; <code>&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#xFF08;privatekey&#xFF09;</code></li>
<li>&#x516C;&#x5F00;&#x5BC6;&#x94A5;&#x4E0E;&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#x662F;&#x4E00;&#x5BF9;&#xFF0C;&#x5982;&#x679C;&#x7528;&#x516C;&#x5F00;&#x5BC6;&#x94A5;&#x5BF9;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x52A0;&#x5BC6;&#xFF0C;&#x53EA;&#x6709;&#x7528;&#x5BF9;&#x5E94;&#x7684;&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#x624D;&#x80FD;&#x89E3;&#x5BC6;&#xFF1B;&#x5982;&#x679C;&#x7528;&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#x5BF9;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x52A0;&#x5BC6;&#xFF0C;&#x90A3;&#x4E48;&#x53EA;&#x6709;&#x7528;&#x5BF9;&#x5E94;&#x7684;&#x516C;&#x5F00;&#x5BC6;&#x94A5;&#x624D;&#x80FD;&#x89E3;&#x5BC6;</li>
</ul>
<h2 id="%E7%89%B9%E7%82%B9">&#x7279;&#x70B9;</h2>
<ul>
<li>&#x7B97;&#x6CD5;&#x5F3A;&#x5EA6;&#x590D;&#x6742;&#x3001;&#x5B89;&#x5168;&#x6027;&#x4F9D;&#x8D56;&#x4E8E;&#x7B97;&#x6CD5;&#x4E0E;&#x5BC6;&#x94A5;</li>
<li>&#x52A0;&#x5BC6;&#x89E3;&#x5BC6;&#x901F;&#x5EA6;&#x6162;</li>
</ul>
<h2 id="%E4%B8%8E%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86%E7%AE%97%E6%B3%95%E7%9A%84%E5%AF%B9%E6%AF%94">&#x4E0E;&#x5BF9;&#x79F0;&#x52A0;&#x5BC6;&#x7B97;&#x6CD5;&#x7684;&#x5BF9;&#x6BD4;</h2>
<ul>
<li>&#x5BF9;&#x79F0;&#x52A0;&#x5BC6;&#x53EA;&#x6709;&#x4E00;&#x79CD;&#x5BC6;&#x94A5;&#xFF0C;&#x5E76;&#x4E14;&#x662F;&#x975E;&#x516C;&#x5F00;&#x7684;&#xFF0C;&#x5982;&#x679C;&#x8981;&#x89E3;&#x5BC6;&#x5C31;&#x5F97;&#x8BA9;&#x5BF9;&#x65B9;&#x77E5;&#x9053;&#x5BC6;&#x94A5;</li>
<li>&#x975E;&#x5BF9;&#x79F0;&#x5BC6;&#x94A5;&#x4F53;&#x5236;&#x6709;&#x4E24;&#x79CD;&#x5BC6;&#x94A5;&#xFF0C;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x662F;&#x516C;&#x5F00;&#x7684;</li>
</ul>
<h2 id="rsa-%E7%AE%97%E6%B3%95%E5%8E%9F%E7%90%86">RSA &#x7B97;&#x6CD5;&#x539F;&#x7406;</h2>
<ol>
<li>&#x627E;&#x51FA;&#x4E24;&#x4E2A;&#x201C;&#x5F88;&#x5927;&#x201D;&#x7684;&#x8D28;&#x6570;&#xFF1A;P &amp; Q<ul>
<li>N = P * Q</li>
<li>M = (P &#x2013; 1) * (Q &#x2013; 1)</li>
</ul>
</li>
<li>&#x627E;&#x51FA;&#x6574;&#x6570;E&#xFF0C;E&#x4E0E;M&#x4E92;&#x8D28;&#xFF0C;&#x5373;&#x9664;&#x4E86;1&#x4E4B;&#x5916;&#xFF0C;&#x6CA1;&#x6709;&#x5176;&#x4ED6;&#x516C;&#x7EA6;&#x6570;</li>
<li>&#x627E;&#x51FA;&#x6574;&#x6570;D&#xFF0C;&#x4F7F;&#x5F97; E<em>D &#x9664;&#x4EE5; M &#x4F59; 1&#xFF0C;&#x5373; (E </em> D) % M = 1</li>
<li>&#x7ECF;&#x8FC7;&#x4E0A;&#x8FF0;&#x51C6;&#x5907;&#x5DE5;&#x4F5C;&#x4E4B;&#x540E;&#xFF0C;&#x53EF;&#x4EE5;&#x5F97;&#x5230;&#xFF1A;<ul>
<li>E&#x662F;&#x516C;&#x94A5;&#xFF0C;&#x8D1F;&#x8D23;&#x52A0;&#x5BC6;</li>
<li>D&#x662F;&#x79C1;&#x94A5;&#xFF0C;&#x8D1F;&#x8D23;&#x89E3;&#x5BC6;</li>
<li>N&#x8D1F;&#x8D23;&#x516C;&#x94A5;&#x548C;&#x79C1;&#x94A5;&#x4E4B;&#x95F4;&#x7684;&#x8054;&#x7CFB;</li>
</ul>
</li>
<li>&#x52A0;&#x5BC6;&#x7B97;&#x6CD5;&#xFF0C;&#x5047;&#x5B9A;&#x5BF9;X&#x8FDB;&#x884C;&#x52A0;&#x5BC6;<ul>
<li>(X ^ E) % N = Y</li>
</ul>
</li>
<li>&#x89E3;&#x5BC6;&#x7B97;&#x6CD5;&#xFF0C;&#x6839;&#x636E;&#x8D39;&#x5C14;&#x9A6C;&#x5C0F;&#x5B9A;&#x4E49;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4EE5;&#x4E0B;&#x516C;&#x5F0F;&#x5B8C;&#x6210;&#x89E3;&#x5BC6;<ul>
<li>(Y ^ D) % N = X</li>
</ul>
</li>
</ol>
<h2 id="%E4%BB%A3%E7%A0%81%E6%BC%94%E7%BB%83">&#x4EE3;&#x7801;&#x6F14;&#x7EC3;</h2>
<pre><code class="lang-objc">CryptorTools *tools = [[CryptorTools alloc] init];

<span class="hljs-comment">// 1. &#x52A0;&#x8F7D;&#x516C;&#x94A5;</span>
<span class="hljs-built_in">NSString</span> *pubPath = [[<span class="hljs-built_in">NSBundle</span> mainBundle] pathForResource:<span class="hljs-string">@&quot;rsacert.der&quot;</span> ofType:<span class="hljs-literal">nil</span>];
[tools loadPublicKeyWithFilePath:pubPath];

<span class="hljs-comment">// 2. &#x4F7F;&#x7528;&#x516C;&#x94A5;&#x52A0;&#x5BC6;&#xFF0C;&#x52A0;&#x5BC6;&#x5185;&#x5BB9;&#x6700;&#x5927;&#x957F;&#x5EA6; 117</span>
<span class="hljs-built_in">NSString</span> *result = [tools RSAEncryptString:<span class="hljs-string">@&quot;abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghi&quot;</span>];
<span class="hljs-built_in">NSLog</span>(<span class="hljs-string">@&quot;RSA &#x52A0;&#x5BC6; %@&quot;</span>, result);

<span class="hljs-comment">// 3. &#x52A0;&#x8F7D;&#x79C1;&#x94A5;&#xFF0C;&#x5E76;&#x6307;&#x5B9A;&#x5BFC;&#x51FA; p12 &#x65F6;&#x8BBE;&#x7F6E;&#x7684;&#x5BC6;&#x7801;</span>
<span class="hljs-built_in">NSString</span> *privatePath = [[<span class="hljs-built_in">NSBundle</span> mainBundle] pathForResource:<span class="hljs-string">@&quot;p.p12&quot;</span> ofType:<span class="hljs-literal">nil</span>];
[tools loadPrivateKey:privatePath password:<span class="hljs-string">@&quot;123&quot;</span>];

<span class="hljs-comment">// 4. &#x4F7F;&#x7528;&#x79C1;&#x94A5;&#x89E3;&#x5BC6;</span>
<span class="hljs-built_in">NSLog</span>(<span class="hljs-string">@&quot;&#x89E3;&#x5BC6;&#x7ED3;&#x679C; %@&quot;</span>, [tools RSADecryptString:result]);
</code></pre>
<h3 id="ios-%E7%9B%B8%E5%85%B3%E5%87%BD%E6%95%B0">iOS &#x76F8;&#x5173;&#x51FD;&#x6570;</h3>
<table>
<thead>
<tr>
<th>&#x51FD;&#x6570;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>SecKeyEncrypt</td>
<td>&#x4F7F;&#x7528;&#x516C;&#x94A5;&#x5BF9;&#x6570;&#x636E;&#x52A0;&#x5BC6;</td>
</tr>
<tr>
<td>SecKeyDecrypt</td>
<td>&#x4F7F;&#x7528;&#x79C1;&#x94A5;&#x5BF9;&#x6570;&#x636E;&#x89E3;&#x5BC6;</td>
</tr>
<tr>
<td>SecKeyRawVerify</td>
<td>&#x4F7F;&#x7528;&#x516C;&#x94A5;&#x5BF9;&#x6570;&#x5B57;&#x7B7E;&#x540D;&#x8FDB;&#x884C;&#x9A8C;&#x8BC1;</td>
</tr>
<tr>
<td>SecKeyRawSign</td>
<td>&#x4F7F;&#x7528;&#x79C1;&#x94A5;&#x751F;&#x6210;&#x6570;&#x5B57;&#x7B7E;&#x540D;</td>
</tr>
</tbody>
</table>
<h2 id="%E5%BA%94%E7%94%A8%E5%9C%BA%E6%99%AF">&#x5E94;&#x7528;&#x573A;&#x666F;</h2>
<p>&#x7531;&#x4E8E; <code>RSA</code> &#x7B97;&#x6CD5;&#x7684;&#x52A0;&#x5BC6;&#x89E3;&#x5BC6;&#x901F;&#x5EA6;&#x8981;&#x6BD4;&#x5BF9;&#x79F0;&#x7B97;&#x6CD5;&#x7684;&#x901F;&#x5EA6;&#x6162;&#x5F88;&#x591A;&#xFF0C;&#x5728;&#x5B9E;&#x9645;&#x5E94;&#x7528;&#x4E2D;&#xFF0C;&#x901A;&#x5E38;&#x91C7;&#x53D6;&#xFF1A;</p>
<ul>
<li>&#x6570;&#x636E;&#x672C;&#x8EAB;&#x7684;&#x52A0;&#x5BC6;&#x89E3;&#x5BC6;&#x4F7F;&#x7528;&#x5BF9;&#x79F0;&#x52A0;&#x5BC6;&#x7B97;&#x6CD5;(AES)</li>
<li>&#x7528; <code>RSA</code> &#x7B97;&#x6CD5;&#x52A0;&#x5BC6;&#x5E76;&#x4F20;&#x8F93;&#x5BF9;&#x79F0;&#x7B97;&#x6CD5;&#x6240;&#x9700;&#x7684;&#x5BC6;&#x94A5;</li>
</ul>
<h2 id="openssl-%E7%BB%88%E7%AB%AF%E6%B5%8B%E8%AF%95%E5%91%BD%E4%BB%A4">OpenSSL &#x7EC8;&#x7AEF;&#x6D4B;&#x8BD5;&#x547D;&#x4EE4;</h2>
<h3 id="%E7%A8%8B%E5%BA%8F%E5%BC%80%E5%8F%91%E8%AF%81%E4%B9%A6%E7%94%9F%E6%88%90">&#x7A0B;&#x5E8F;&#x5F00;&#x53D1;&#x8BC1;&#x4E66;&#x751F;&#x6210;</h3>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x751F;&#x6210;&#x79C1;&#x94A5;</span>
$ openssl genrsa -out private.pem <span class="hljs-number">1024</span>
<span class="hljs-comment"># &#x521B;&#x5EFA;&#x8BC1;&#x4E66;&#x8BF7;&#x6C42;</span>
$ openssl req -new -key private.pem -out rsacert.csr
<span class="hljs-comment"># &#x751F;&#x6210;&#x8BC1;&#x4E66;&#x5E76;&#x7B7E;&#x540D;&#xFF0C;&#x6709;&#x6548;&#x671F;10&#x5E74;</span>
$ openssl x509 -req -days <span class="hljs-number">3650</span> -in rsacert.csr -signkey private.pem -out rsacert.crt
<span class="hljs-comment"># &#x8F6C;&#x6362;&#x683C;&#x5F0F;-&#x5C06; PEM &#x683C;&#x5F0F;&#x6587;&#x4EF6;&#x8F6C;&#x6362;&#x6210; DER &#x683C;&#x5F0F;</span>
$ openssl x509 -outform der -in rsacert.crt -out rsacert.der
<span class="hljs-comment"># &#x5BFC;&#x51FA;P12&#x6587;&#x4EF6;</span>
$ openssl pkcs12 -export -out p.p12 -inkey private.pem -in rsacert.crt
</code></pre>
<blockquote>
<p>&#x5728;&#x82F9;&#x679C;&#x5F00;&#x53D1;&#x4E2D;&#xFF0C;&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x4F7F;&#x7528; PEM &#x683C;&#x5F0F;&#x7684;&#x8BC1;&#x4E66;</p>
</blockquote>
<ul>
<li><code>DER</code> &#x6587;&#x4EF6;&#x662F; <code>CRT</code> &#x6587;&#x4EF6;&#x7684; <code>BASE 64</code> &#x89E3;&#x7801;&#x524D;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x6570;&#x636E;&#x6587;&#x4EF6;</li>
<li><code>OpenSSL</code> &#x9ED8;&#x8BA4;&#x751F;&#x6210;&#x7684;&#x90FD;&#x662F; <code>PEM</code> &#x683C;&#x5F0F;&#x7684;&#x8BC1;&#x4E66;&#xFF08;BASE64 &#x7F16;&#x7801;&#x540E;&#x7684;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF09;</li>
</ul>
<h3 id="%E6%95%B0%E5%AD%97%E7%AD%BE%E5%90%8D">&#x6570;&#x5B57;&#x7B7E;&#x540D;</h3>
<ul>
<li>&#x53D1;&#x9001;&#x65B9;<ul>
<li><code>&#x62A5;&#x6587;</code> HASH &#x5F97;&#x5230; <code>&#x62A5;&#x6587;&#x6458;&#x8981;</code></li>
<li><code>&#x62A5;&#x6587;&#x6458;&#x8981;</code> &#x7528;&#x516C;&#x94A5;&#x52A0;&#x5BC6;(&#x6570;&#x5B57;&#x7B7E;&#x540D;) + &#x62A5;&#x6587;</li>
<li>&#x53D1;&#x9001;&#x7ED9;&#x63A5;&#x6536;&#x65B9;</li>
</ul>
</li>
<li>&#x63A5;&#x6536;&#x65B9;<ul>
<li><code>&#x62A5;&#x6587;</code> HASH &#x5F97;&#x5230; <code>&#x62A5;&#x6587;&#x6458;&#x8981;</code></li>
<li><code>&#x6570;&#x5B57;&#x7B7E;&#x540D;</code> &#x7528;&#x79C1;&#x94A5;&#x89E3;&#x5BC6; &#x5224;&#x65AD;&#x662F;&#x5426;&#x4E0E; <code>&#x62A5;&#x6587;&#x6458;&#x8981;</code> &#x76F8;&#x540C;</li>
</ul>
</li>
</ul>
<h3 id="openssl-%E7%94%9F%E6%88%90%E5%AF%86%E9%92%A5%E6%BC%94%E7%BB%83">OpenSSL &#x751F;&#x6210;&#x5BC6;&#x94A5;&#x6F14;&#x7EC3;</h3>
<h4 id="%E7%A7%81%E9%92%A5-%E5%85%AC%E9%92%A5">&#x79C1;&#x94A5; &amp; &#x516C;&#x94A5;</h4>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x751F;&#x6210;&#x5F3A;&#x5EA6;&#x662F; 512 &#x7684; RSA &#x79C1;&#x94A5;</span>
$ openssl genrsa -out private.pem <span class="hljs-number">512</span>
<span class="hljs-comment"># &#x4EE5;&#x660E;&#x6587;&#x8F93;&#x51FA;&#x79C1;&#x94A5;&#x5185;&#x5BB9;</span>
$ openssl rsa -in private.pem -text -out private.txt
<span class="hljs-comment"># &#x6821;&#x9A8C;&#x79C1;&#x94A5;&#x6587;&#x4EF6;</span>
$ openssl rsa -in private.pem -check
<span class="hljs-comment"># &#x4ECE;&#x79C1;&#x94A5;&#x4E2D;&#x63D0;&#x53D6;&#x516C;&#x94A5;</span>
$ openssl rsa -in private.pem -out public.pem -outform PEM -pubout
<span class="hljs-comment"># &#x4EE5;&#x660E;&#x6587;&#x8F93;&#x51FA;&#x516C;&#x94A5;&#x5185;&#x5BB9;</span>
$ openssl rsa -in public.pem -out public.txt -pubin -pubout -text
</code></pre>
<h4 id="%E5%8A%A0%E5%AF%86-%E8%A7%A3%E5%AF%86">&#x52A0;&#x5BC6; &amp; &#x89E3;&#x5BC6;</h4>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x4F7F;&#x7528;&#x516C;&#x94A5;&#x52A0;&#x5BC6;&#x5C0F;&#x6587;&#x4EF6;</span>
$ openssl rsautl -encrypt -pubin -inkey public.pem -in msg.txt -out msg.bin
<span class="hljs-comment"># &#x4F7F;&#x7528;&#x79C1;&#x94A5;&#x89E3;&#x5BC6;&#x5C0F;&#x6587;&#x4EF6;</span>
$ openssl rsautl -decrypt -inkey private.pem -in msg.bin -out a.txt
</code></pre>
<h4 id="%E6%A0%BC%E5%BC%8F%E8%BD%AC%E6%8D%A2">&#x683C;&#x5F0F;&#x8F6C;&#x6362;</h4>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5C06;&#x79C1;&#x94A5;&#x8F6C;&#x6362;&#x6210; DER &#x683C;&#x5F0F;</span>
$ openssl rsa -in private.pem -out private.der -outform der
<span class="hljs-comment"># &#x5C06;&#x516C;&#x94A5;&#x8F6C;&#x6362;&#x6210; DER &#x683C;&#x5F0F;</span>
$ openssl rsa -in public.pem -out public.der -pubin -outform der
</code></pre>
<h3 id="pkcs">PKCS</h3>
<ul>
<li>Public-Key Cryptography Standards (PKCS)&#x662F;&#x7531;&#x7F8E;&#x56FD; RSA &#x6570;&#x636E;&#x5B89;&#x5168;&#x516C;&#x53F8;&#x53CA;&#x5176;&#x5408;&#x4F5C;&#x4F19;&#x4F34;&#x5236;&#x5B9A;&#x7684;&#x4E00;&#x7EC4;&#x516C;&#x94A5;&#x5BC6;&#x7801;&#x5B66;&#x6807;&#x51C6;&#xFF0C;&#x5176;&#x4E2D;&#x5305;&#x62EC;&#x8BC1;&#x4E66;&#x7533;&#x8BF7;&#x3001;&#x8BC1;&#x4E66;&#x66F4;&#x65B0;&#x3001;&#x8BC1;&#x4E66;&#x4F5C;&#x5E9F;&#x8868;&#x53D1;&#x5E03;&#x3001;&#x6269;&#x5C55;&#x8BC1;&#x4E66;&#x5185;&#x5BB9;&#x4EE5;&#x53CA;&#x6570;&#x5B57;&#x7B7E;&#x540D;&#x3001;&#x6570;&#x5B57;&#x4FE1;&#x5C01;&#x7684;&#x683C;&#x5F0F;&#x7B49;&#x65B9;&#x9762;&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x76F8;&#x5173;&#x534F;&#x8BAE;</li>
</ul>
<h4 id="pkcs%E5%8D%8F%E8%AE%AE">PKCS&#x534F;&#x8BAE;</h4>
<table>
<thead>
<tr>
<th>&#x534F;&#x8BAE;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>PKCS#1</td>
<td>&#x5B9A;&#x4E49; RSA &#x516C;&#x5F00;&#x5BC6;&#x94A5;&#x7B97;&#x6CD5;&#x52A0;&#x5BC6;&#x548C;&#x7B7E;&#x540D;&#x673A;&#x5236;&#xFF0C;&#x4E3B;&#x8981;&#x7528;&#x4E8E;&#x7EC4;&#x7EC7; PKCS#7 &#x4E2D;&#x6240;&#x63CF;&#x8FF0;&#x7684;&#x6570;&#x5B57;&#x7B7E;&#x540D;&#x548C;&#x6570;&#x5B57;&#x4FE1;&#x5C01;&#xFF08;&#x4E13;&#x95E8;&#x7528;&#x6765;&#x52A0;&#x5BC6;/&#x89E3;&#x5BC6;&#xFF09;</td>
</tr>
<tr>
<td>PKCS#8</td>
<td>&#x63CF;&#x8FF0;&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#x4FE1;&#x606F;&#x683C;&#x5F0F;&#xFF0C;&#x8BE5;&#x4FE1;&#x606F;&#x5305;&#x62EC;&#x516C;&#x5F00;&#x5BC6;&#x94A5;&#x7B97;&#x6CD5;&#x7684;&#x79C1;&#x6709;&#x5BC6;&#x94A5;&#x4EE5;&#x53CA;&#x53EF;&#x9009;&#x7684;&#x5C5E;&#x6027;&#x96C6;&#x7B49;&#xFF08;JAVA&#x4F7F;&#x7528;&#xFF09;</td>
</tr>
<tr>
<td>PKCS#12</td>
<td>&#x63CF;&#x8FF0;&#x4E2A;&#x4EBA;&#x4FE1;&#x606F;&#x4EA4;&#x6362;&#x8BED;&#x6CD5;&#x6807;&#x51C6;&#x3002;&#x63CF;&#x8FF0;&#x4E86;&#x5C06;&#x7528;&#x6237;&#x516C;&#x94A5;&#x3001;&#x79C1;&#x94A5;&#x3001;&#x8BC1;&#x4E66;&#x548C;&#x5176;&#x4ED6;&#x76F8;&#x5173;&#x4FE1;&#x606F;&#x6253;&#x5305;&#x7684;&#x8BED;&#x6CD5;&#xFF08;&#x82F9;&#x679C;&#x4F7F;&#x7528;&#xFF09;</td>
</tr>
</tbody>
</table>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="./cipher-04-aes.html" class="navigation navigation-prev " aria-label="Previous page: 对称加密算法"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="./post_method.html" class="navigation navigation-next " aria-label="Next page: POST增强"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="gitbook/app.js"></script>

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontSettings":{"theme":null,"family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
